//
//  GLGWLabel.h
//  GLGW_Shoping
//
//  Created by yang on 2018/11/8.
//  Copyright © 2018年 yang. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface GLGWLabel : UILabel

/** 设置内边距 */
@property (assign, nonatomic) UIEdgeInsets newEdgeInsets;

-(id)initWithInSuperView:(UIView *)aSuperView;

-(id)initWithFont:(UIFont *)aFont
         theColor:(UIColor *)aColor
      inSuperView:(UIView *)aSuperView;

-(id)initWithFrame:(CGRect)aFrame
           theFont:(UIFont *)aFont
          theColor:(UIColor *)aColor
       inSuperView:(UIView *)aSuperView;

/**
 计算label的大小宽度
 
 @param s_test 需要计算的文字
 @param with label的宽度
 @return label的大小
 */
+ (CGSize)sizeWithTheText:(NSString *)s_test theLabelWith:(CGFloat)with theTextFont:(UIFont *)fontSize;

/**
 计算label的大小高度
 
 @param s_test 需要计算的文字
 @param height label的高度
 @param fontSize label的字体大小
 @return label的大小
 */
+ (CGSize)sizeWithTheText:(NSString *)s_test theLabelHeight:(CGFloat)height theTextFont:(UIFont *)fontSize;
/**
 *  图片加到label上
 */
+ (NSMutableAttributedString *)addImageName:(NSString *)iName theImageFram:(CGRect)aFram theTextString:(NSString *)tStr atImageIndex:(NSInteger)index;

/**
 改变颜色

 @param allStr 全部
 @param lineSpace 需要改变的
 @param wordColor s颜色
 @param aFont 字号
 @return string
 */
+ (NSMutableAttributedString *)bllChangeStr:(NSString *)allStr changewithStr:(NSString *)lineSpace changeColoer:(UIColor *)wordColor withFont:(UIFont *)aFont;
/**
 *  改变行间距
 */
+ (NSMutableAttributedString *)changeLineWithSpace:(float)space theInoutText:(NSString *)aText;
@end

NS_ASSUME_NONNULL_END
